package sustav.gui;


import java.awt.Dimension;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextArea;


public class KomponentaIzvjesca extends JPanel{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1073785221633012449L;
	private JTextArea text;

	public KomponentaIzvjesca(){
		this.setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
		this.setPreferredSize(new Dimension(500,400));
		JTabbedPane tabs=new JTabbedPane();
		
		text=new JTextArea();
		JTable lzwRjecnik=new JTable();
		text.setSize(500,100);
		text.setEditable(false);
		text.setLineWrap(true);
		text.setWrapStyleWord(true);
		JScrollPane scrol=new JScrollPane(text);
		tabs.addTab("Izlaz", scrol);
		this.add(tabs);	
	}
	
 public void dodajIzlaz(String s){
	 
	 text.setText(text.getText()+"\n"+s);
	 
 }
 
 public void ocistiIzlaz(){
	 text.setText("");
	 
 }
		
	


}
